package org.domain.demo.session.user;

import java.util.List;

import javax.ejb.Stateless;

import org.domain.demo.entity.Users;
import org.domain.demo.session.query.UsersQuery;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.log.Log;
import org.jboss.seam.international.StatusMessages;

@Stateless
@Name("userSearch")
public class UserSearchBean implements UserSearch
{
    @Logger private Log log;

    @In StatusMessages statusMessages;
    
    @In(create=true)
    @Out(required=false)
    private UsersQuery usersQuery;
    
    @Out(scope=ScopeType.PAGE)
    private List<Users> usersDataModel;

    public void userSearch()
    {
    	log.info(this, "user search");
    	usersDataModel = usersQuery.getResultList();
    }

	public String userUpdate() {
		return "updateUserMaintain";
	}

    // add additional action methods

}
